home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / dcgames4.zip / CIVILIAN.SCR < prev    next >
Text File  |  1995-10-02  |  2KB  |  87 lines

  1. !
  2. ! Default civilian script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6. ! Pending Enhancements
  7. !
  8. ! - This script has no voices.  For an example of voices, look at
  9. !   MERCHANT.SCR and HEALER.SCR
  10. !   
  11.  
  12. !------------------------------------------------------------------------!
  13. :@TALK ! Talk to the character !
  14. !------------------------------------------------------------------------!
  15.  
  16.   if player.hp = 0 then
  17.     writeln( player.name, " is dead!" );
  18.     STOP;
  19.   endif;
  20.  
  21.   if npc.picture >= 0 then
  22.     viewpcx(npc);
  23.   endif;
  24.  
  25.   loadtext( npc.text ); ! Get the NPC's text block !
  26.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  27.  
  28. ! First, say hello.. !
  29.   if NPC.V0 > 0 then
  30.     writeln( "Hello ", player.name, ". What brings you back?" );
  31.   else
  32.     writeln( "Hello. I am ", npc.name, ". How may I help you?" );
  33.   endif;
  34.  
  35. ! Now, set some variables..
  36.   NPC.V0 = 1; ! From know on, remember we've been here
  37.  
  38. :LOOP
  39.   L3 = getstr("Name","Job","Join","Bye");
  40.   if L3 = -1 then 
  41.     writeln( "Ok." );
  42.     goto XSTOP;
  43.   endif;
  44.  
  45. ! First, see if the keyword typed is in the character's text block !
  46.   if dotext( S0 ) then
  47.     if L3 = 3 goto XSTOP;
  48.     goto LOOP;
  49.   endif;
  50.  
  51. ! It didn't, so try the predefined ones..
  52.   on L3 goto CNAME, CJOB, CJOIN, CSTOP;
  53.  
  54. ! Nope, try a 'DEFAULT' line
  55.   if not dotext( "DEFAULT" ) then
  56.     writeln( "I don't know anything about that!" );
  57.   endif;
  58.   goto LOOP;
  59.  
  60. :CNAME
  61.   writeln( "My name is ", NPC.name, "." );
  62.   GOTO LOOP;
  63.  
  64. :CJOB
  65.   writeln( "I am a ", npc.type );
  66.   GOTO LOOP;
  67.  
  68. :CJOIN
  69.   writeln( "I'm too busy.  Sorry." );
  70.   GOTO LOOP;
  71.  
  72. :CSTOP
  73.   writeln( "Nice talking to you.." );
  74.   goto XSTOP;
  75.  
  76. ! Feel free to expand on this list.. !
  77.  
  78. !-----------------------------------------------------------------!
  79. ! All STOPs now lead here so the screen can be restored if needed !
  80. !-----------------------------------------------------------------!
  81. :XSTOP
  82.   if npc.picture >= 0 then
  83.     paint(window); ! Assumes the picture fits in the window !
  84.   endif;
  85.   stats(-1); ! Refresh Statistics !
  86.   STOP;
  87.